package com.lxb.eduservice.client;

import com.lxb.commonutils.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * server-vod服务提供接口
 *
 * @author xuebin.li
 * @createTime 2022/12/3 23:39
 */

@FeignClient(value = "service-vod", fallback = VodClientImpl.class) //指定从哪个服务中调用功能 ，名称与被调用的服务名保持一致。
public interface VodClient {

    /**
     * 根据视频id，删除阿里云云端视频
     * @param videoId
     * @return
     */
    @DeleteMapping("/eduVod/video/removeVideo/{videoId}")
    public R deleteVideoByID(@PathVariable("videoId") String videoId);

    /**
     * 根据视频id集合，删除多个视频
     * @param vodIds
     */
    @DeleteMapping("/eduVod/video/deleteBath")
    public R deleteBath(@RequestParam("vodIds")List<String> vodIds);
}
